﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using XueMeng.BLL;
using XueMeng.Model;

namespace UI
{
    public partial class EditProblem : Form
    {
        public EditProblem()
        {
            InitializeComponent();
        }

        private void EditProblem_Load(object sender, EventArgs e)
        {
            LoadEvent();
        }

        private void LoadEvent()
        {
            this.button1.Click += new EventHandler(button1_Click);
        }

        void button1_Click(object sender, EventArgs e)
        {
            if (this.richTextBox1.Text.Trim()=="")
            {
                MessageBox.Show("问题不能为空");
                return;
            }
            Help.TemporarySet.Problems.Add(new Problem() { P_Context = this.richTextBox1.Text });
            this.Close();
        }
    }
}
